<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>基金档案信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style type="text/css">
        body {
            background-color: #ffffff;
        }
        /* 设置下拉框宽度 */
        /* input.layui-input.layui-unselect {width:400px} */
    </style>

</head>
<body>
<div class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label">费用类型：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="costType"" readonly="readonly" value="" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">阶梯收费：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="ladderCharge"" readonly="readonly" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">阶梯下限：</label>
        <div class="layui-input-block" style="width: 400px;">
            <input type="text" name="lowerLimit" readonly="readonly"  value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">阶梯上限：</label>
        <div class="layui-input-block">
            <input name="upperLimit" style="width: 400px;" type="text" readonly="readonly" class="layui-input" id="test1" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">阶梯单位：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="ladderUnit" readonly="readonly" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">费用数额：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="amountOfExpense"" readonly="readonly" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">费用单位：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="costUnit"" readonly="readonly" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">录入时间：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="createTime" readonly="readonly" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">修改时间：</label>
        <div class="layui-input-block">
            <input style="width: 400px;" type="text" name="updateTime" readonly="readonly" value="" class="layui-input">
        </div>
    </div>


</div>
<script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../../js/common/constant.js"></script>
<script>
    layui.use(['form','laydate','layer'], function () {
        var laydate = layui.laydate;
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        /* 查询当前的基金档案信息 */
        $(function(){
            var url = location.search;
            var i = url.indexOf("=");
            var id = url.substring(i+1);
            $.ajax({
                url:getRootPath()+'web/servercost/one',
                type:"GET",
                data:{
                    serverCostId:id
                },
                async:false,
                dataType:"json",
                success:function(data){
                    if(data.code == 200){
                        var serverCost = data.data;
                        //费用类型
                        if(serverCost.costType==1){
                            $("input[name='costType']").val("申购费用")
                        }else if(serverCost.costType==2){
                            $("input[name='costType']").val("赎回费用")
                        }else if(serverCost.costType==3){
                            $("input[name='costType']").val("管理费用")
                        }else if(serverCost.costType==4){
                            $("input[name='costType']").val("托管费用")
                        }else if(serverCost.costType==5){
                            $("input[name='costType']").val("服务费用")
                        }else if(serverCost.costType==6){
                            $("input[name='costType']").val("其他费用")
                        }
                        //阶梯收费
                        if(serverCost.ladderCharge==1){
                            $("input[name='ladderCharge']").val("是")
                        }else{
                            $("input[name='ladderCharge']").val("不是")
                        }
                        //阶梯下限
                        if(serverCost.ladderCharge==0){
                            $("input[name='lowerLimit']").val("-1")
                        }else{
                            $("input[name='lowerLimit']").val(serverCost.lowerLimit)
                        }
                        //阶梯上限
                        if(serverCost.ladderCharge==0){
                            $("input[name='upperLimit']").val("-1")
                        }else{
                            $("input[name='upperLimit']").val(serverCost.upperLimit)
                        }
                        //阶梯单位
                        if(serverCost.ladderCharge==0){
                            $("input[name='ladderUnit']").val("无")
                        }else if(serverCost.ladderUnit==2){
                            $("input[name='ladderUnit']").val("元")
                        }else if(serverCost.ladderUnit==1){
                            $("input[name='ladderUnit']").val("天")
                        }
                        //费用数额
                        $("input[name='amountOfExpense']").val(serverCost.amountOfExpense)
                        //费用单位
                        if(serverCost.costUnit==1){
                            $("input[name='costUnit']").val("%")
                        }else if(serverCost.costUnit==2){
                            $("input[name='costUnit']").val("元")
                        }
                        $("input[name='createTime']").val(serverCost.createTime)
                        $("input[name='updateTime']").val(serverCost.updateTime)
                    }else{
                        layer.alert(data.message)
                    }
                   
                }
            })
        })
    });

</script>
</body>
</html>